package com.zhiyou100.www.bbs.function.jdbctool;

import java.sql.*;

/**
 * @packageName: MysqlTest
 * @className: com.zhiyou100.www.bbs.function.jdbctool
 * @Description: TODO mysql 测试类
 * @author: yang
 * @date: 2020/6/4
 */
public class MysqlTest {
    public static void main(String[] args) throws SQLException {
        Connection connection = JavaDataBaseConnectivityUtil.getConnection();
        PreparedStatement statement = connection.prepareStatement("select * from tableLevel");
        ResultSet resultSet = statement.executeQuery();
        while (resultSet.next()){
            System.out.println(resultSet.getString(1)+" "+resultSet.getString(2));
        }
        JavaDataBaseConnectivityUtil.close(resultSet,statement,connection);

    }

}
